AWS

  • Setup EBS for virtualenv and Data Storage
$ sudo mkfs.ext4 /dev/xvdb 
mke2fs 1.42.13 (17-May-2015)
Creating filesystem with 26214400 4k blocks and 6553600 inodes
Filesystem UUID: 31dcd857-83df-4288-86c0-d9e0bdb5e65d
Superblock backups stored on blocks: 
    32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
    4096000, 7962624, 11239424, 20480000, 23887872

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
$ sudo umount ./work 
$ sudo mount /dev/xvdb ./work/
$ sudo chown ubuntu.ubuntu -R ~/work/

CUDA and NVIDIA stuffs

  • CUDA

  • CUDNN

    • https://developer.nvidia.com/cudnn
      $ tar -xzvf cudnn-8.0-linux-x64-v5.1.tgz
      $ sudo cp -a cuda/include/cudnn.h /usr/local/cuda/include
      $ sudo cp -a cuda/lib64/libcudnn* /usr/local/cuda/lib64
      $ sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn*
      
  • REBOOT

Virtualenv

  • setup virtualenv
    $ sudo apt-get install python3-pip python3-dev
    $ sudo -H pip3 install --upgrade pip
    $ sudo pip3 install virtualenv
    $ virtualenv virtualenv
    $ source virtualenv/bin/activate
    $ pip3 install opencv-python
    $ pip3 install scipy
    $ pip3 install pillow
    $ pip3 install xmltodict
    $ pip3 install tqdm
    

OpenCV

cmake -D BUILD_PERF_TESTS=OFF -D BUILD_TESTS=OFF -D WITH_OPENCL=OFF -D WITH_CUDA=OFF -D WITH_IPP=OFF -D PYTHON_DEFAULT_EXECUTABLE=/home/ubuntu/work/virtualenv/bin/python3.5 -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/opt  ..

Tensorflow

Setup

  • setup
    $ sudo apt-get install libcupti-dev
    $ pip3 install --upgrade tensorflow-gpu
    

In [ ]: